<!--
 * @Author: 许警 11378748333@
 * @Date: 2024-07-05 11:06:29
 * @LastEditors: 许警 11378748333@
 * @LastEditTime: 2024-07-10 11:50:32
 * @FilePath: /hsxlsystem/src/components/common/card.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="content">
    <div class="cars" v-for="(item, index) in list" :key="index">
      <a-card>
        <div class="car">
          <h3 class="title">{{ item.name }}</h3>
          <!-- <div class="time">{{ form.startTime || '2010-12-12' }}~{{form.endTime || item.endTime }}</div> -->
          <div class="nums">
            <span v-if="item.isMoney">¥</span>
            {{ data ? data[item.value] : '请求中...' }}
            <span v-if="item.unit" class="unit">{{ item.unit }}</span>
          </div>
        </div>
      </a-card>
    </div>
  </div>
</template>

<script>
import { onMounted, reactive, ref, toRefs, computed } from 'vue'
export default {
  props: {
    list: {
      type: Array,
      default: () => []
    },
    data: {
      default: () => {}
    }
  },
  setup(props, { emit, attrs }) {
    return {}
  }
}
</script>
<style scoped>
.content {
  display: flex;
  flex-wrap: wrap;
  .cars {
    padding: 9px;
    /* min-width: 15%; */
    .car {
      .title {
      }
      .nums {
        margin-top: 6px;
        font-size: 24px;
      }
    }
  }
}
</style>
